home *** CD-ROM | disk | FTP | other *** search
- Path: news1.is.net!news
- From: rob@america.net (Rob Garner)
- Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.tools.mfc
- Subject: Re: Getting functions out of libraries to work
- Date: Fri, 23 Feb 1996 06:02:07 GMT
- Organization: Cheyenne Software
- Message-ID: <312d57eb.11400999@news1.is.net>
- References: <312BBC29.6772@uni.massey.ac.nz>
- Reply-To: rob@america.net
- NNTP-Posting-Host: 204.180.18.189
- X-Newsreader: Forte Agent .99d/32.182
-
- Nigel.Ramsay.1@massey.ac.nz wrote:
-
- >Hi,
- >
- >I am trying to get some functions out of a library to work. The problem
- >is that I keep getting an "unresolved external" error whenever I try to
- >call the functions.
- >
- >The funny thing is that it works fine when I compile under just C.
- >
- >I am using Microsoft Visual C++ 1.0, running under Windows 95.
- >
-
- the function prototypes that you wish to call must be declared
- extern "C"
-
- try:
-
- extern "C"
- {
- void foo1(void);
- void foo2(void);
- }
-
- or
-
- extern "C" void foo1(void);
-
- later,
- rob
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The crux of the matter is the apostrophe.
- - Frank Zappa
-
- rob@america.net
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-